package com.ruoyi.system.controller.backend;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.SafetyPublicityInfo;
import com.ruoyi.system.domain.front.PublicitySelect;
import com.ruoyi.system.service.front.ISafetyPublicFrontService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 案件信息Controller
 *
 * @author ruoyi
 * @date 2021-04-07
 */
@RestController
@RequestMapping("/system/back/safetypublicfront")
public class SafetyPublicBackController extends BaseController{
    @Autowired
    private ISafetyPublicFrontService safetyPublicFrontService;

    /**
     * 查询安全宣传列表
     */
    @GetMapping("/selectpublictime")
    public TableDataInfo selectpublictime(PublicitySelect publicitySelect)
    {
        logput(publicitySelect,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        TableDataInfo tableDataInfo = getDataTable(safetyPublicFrontService.selectpublictime(publicitySelect));
        logout(tableDataInfo,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        return tableDataInfo;
    }

    /**
     * 获取安全宣传详细信息
     */
    //@PreAuthorize("@ss.hasPermi('system:publicityinfo:detailed')")
    @PostMapping("/publicityinfodetailed")
    public TableDataInfo detailed(@RequestBody SafetyPublicityInfo safetyPublicityInfo)
    {
        logput(safetyPublicityInfo,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        TableDataInfo tableDataInfo = getDataTable(safetyPublicFrontService.selectSafetyPublicityInfoDetailed(safetyPublicityInfo));
        logout(tableDataInfo,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        return tableDataInfo;
    }

    /**
     * 查询安全宣传分类
     */
    @GetMapping("/selectpublicitytype")
    public TableDataInfo selectpublicitytype()
    {
        logput(null,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        TableDataInfo tableDataInfo = getDataTable(safetyPublicFrontService.selectpublicitytype());
        logout(tableDataInfo,Thread.currentThread().getStackTrace()[1].getMethodName(),this.getClass());
        return tableDataInfo;
    }
}


